// 管理员看到的菜单
export const adminRouter = () => {
  return {
    code: 200,
    msg: '成功',
    data: {
      rows: [
        {
          path: '/home',
          meta: {
            roles: ['admin', 'common'],
            title: 'router.home',
          },
          name: 'router.home',
          component: 'view/home/home.vue',
        },
        {
          path: '/about',
          meta: {
            roles: ['admin', 'common'],
            title: 'router.about',
          },
          name: 'router.about',
          component: 'view/about/about',
        },
        {
          path: '/order',
          meta: {
            roles: ['admin', 'common'],
            title: 'router.order',
          },
          name: 'router.order',
          component: 'layout/routerview/Parent',
          children: [
            {
              path: '/order/list',
              meta: {
                roles: ['admin', 'common'],
                title: 'router.order_list',
              },
              name: 'router.order_list',
              component: 'view/order/list',
            },
            {
              path: '/order/stock',
              meta: {
                roles: ['admin', 'common'],
                title: 'router.order_stock',
              },
              name: 'router.order_stock',
              component: 'layout/routerview/Parent',
              children: [
                {
                  path: '/order/price',
                  meta: {
                    roles: ['admin', 'common'],
                    title: 'router.order_stock_price',
                  },
                  name: 'router.order_stock_price',
                  component: 'view/order/price',
                },
              ],
            },
          ],
        },
        {
          path: '/system',
          name: 'router.system',
          meta: {
            roles: ['admin'],
            title: 'router.system',
          },
          component: 'layout/routerview/Parent',
          children: [
            {
              path: '/system/menu',
              meta: {
                roles: ['admin'],
                title: 'router.system_menu',
              },
              name: 'router.system_menu',
              component: 'view/system/menu',
            },
            {
              path: '/system/role',
              meta: {
                roles: ['admin'],
                title: 'router.system_role',
              },
              name: 'router.system_role',
              component: 'view/system/role',
            },
            {
              path: '/system/user',
              meta: {
                roles: ['admin'],
                title: 'router.system_user',
              },
              name: 'router.system_user',
              component: 'view/system/user',
            },
            {
              path: '/system/dept',
              meta: {
                roles: ['admin'],
                title: 'router.system_dept',
              },
              name: 'router.system_dept',
              component: 'view/system/dept',
            },
          ],
        },
      ],
    },
  }
}

// 普通用户看到的菜单
export const commonRouter = () => {
  return {
    code: 200,
    msg: '成功',
    data: {
      rows: [
        {
          path: '/home',
          meta: {
            roles: ['admin', 'common'],
            title: 'router.home',
          },
          name: 'router.home',
          component: 'view/home/home.vue',
        },
        {
          path: '/about',
          meta: {
            roles: ['admin', 'common'],
            title: 'router.about',
          },
          name: 'router.about',
          component: 'view/about/about',
        },
        {
          path: '/order',
          meta: {
            roles: ['admin', 'common'],
            title: 'router.order',
          },
          name: 'router.order',
          component: 'layout/routerview/Parent',
          children: [
            {
              path: '/order/list',
              meta: {
                roles: ['admin', 'common'],
                title: 'router.order_list',
              },
              name: 'router.order_list',
              component: 'view/order/list',
            },
            {
              path: '/order/stock',
              meta: {
                roles: ['admin', 'common'],
                title: 'router.order_stock',
              },
              name: 'router.order_stock',
              component: 'layout/routerview/Parent',
              children: [
                {
                  path: '/order/price',
                  meta: {
                    roles: ['admin', 'common'],
                    title: 'router.order_stock_price',
                  },
                  name: 'router.order_stock_price',
                  component: 'view/order/price',
                },
              ],
            },
          ],
        },
      ],
    },
  }
}
